<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox-content">
                <form class="form-horizontal m-t" id="signupForm">

                    <input id="id" name="id" th:value="${user.id}" type="hidden">
                    <input type="hidden" id="types" th:value="${user.userType}">

                    <div class="form-group" style="display: none">
                        <label class="col-sm-3 control-label">用户类型(学生或老师)：</label>
                        <div class="col-sm-8">
                            <select id="userType" name="userType" class="form-control">
                                <option value="">请选择</option>
                                <option value="0">学生</option>
                                <option value="1">老师</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-3 control-label">用户姓名<span style="color: red">*</span>：</label>
                        <div class="col-sm-8">
                            <input id="username" name="username" class="form-control" type="text"
                                   th:value="${user.username}">
                        </div>
                    </div>

                    <input type="hidden" name="type" th:value="${user.type}">
                    <!--						<div class="form-group" th:if="${user.type>0}" style="display: none">-->
                    <!--							<label class="col-sm-3 control-label">所属机构：</label>-->
                    <!--							<div class="col-sm-8">-->
                    <!--								<input name="orgName" class="form-control" type="text" th:value="${user.orgName}" >-->
                    <!--							</div>-->
                    <!--						</div>-->
                    <!--						<div class="form-group" th:if="${user.type==0}" style="display: none">-->
                    <!--							<label class="col-sm-3 control-label">所属机构：</label>-->
                    <!--							<div class="col-sm-8">-->
                    <!--								<select name="orgId" class="form-control">-->
                    <!--									<option value="">请选择</option>-->
                    <!--									<option th:each="item : ${organizationNews}" th:selected="${user.orgId eq item.id}" th:value="${item.id}" th:text="${item.name}"></option>-->
                    <!--								</select>-->
                    <!--							</div>-->
                    <!--						</div>-->
                    <div class="form-group">
                        <label class="col-sm-3 control-label">电话号码<span style="color: red">*</span>：</label>
                        <div class="col-sm-8">
                            <input id="mobile" name="mobile" class="form-control"
                                   type="number" th:value="${user.mobile}">
                        </div>
                    </div>
                    <div class="form-group" style="display: none">
                        <label class="col-sm-3 control-label">身份证号码：</label>
                        <div class="col-sm-8">
                            <input id="idNumber" name="idNumber" class="form-control"
                                   type="text" th:value="${user.idNumber}">
                        </div>
                    </div>
                    <div class="form-group" style="display: none">
                        <label class="col-sm-3 control-label">E-mail：</label>
                        <div class="col-sm-8">
                            <input id="email" name="email" class="form-control" type="email"
                                   th:value="${user.email}">
                        </div>
                    </div>
                    <div class="form-group" style="display: none">
                        <label class="col-sm-3 control-label">省份id：</label>
                        <div class="col-sm-8">
                            <input id="regionProvinceId" name="regionProvinceId" class="form-control" type="text"
                                   th:value="${user.regionProvinceId}">
                        </div>
                    </div>

                    <div class="form-group" style="display: none">
                        <label class="col-sm-3 control-label">城市id：</label>
                        <div class="col-sm-8">
                            <input id="regionCityId" name="regionCityId" class="form-control" type="text"
                                   th:value="${user.regionCityId}">
                        </div>
                    </div>
                    <div class="form-group" style="display: none">
                        <label class="col-sm-3 control-label">性别：</label>
                        <div class="col-sm-8">
                            <input id="sexHidden" th:value="${user.sex}" class="form-control"
                                   type="hidden">
                            <select id="sex" name="sex" class="form-control">
                                <option value="">请选择</option>
                                <option value="0">未知</option>
                                <option value="1">男</option>
                                <option value="2">女</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group" style="display: none">
                        <label class="col-sm-3 control-label">审核状态：</label>
                        <div class="col-sm-8">
                            <input id="stateType" th:value="${user.state}" class="form-control"
                                   type="hidden">
                            <select id="state" name="state" class="form-control">
                                <option value="">请选择</option>
                                <option value="0">审核中</option>
                                <option value="1">通过</option>
                                <option value="2">未通过</option>
                                <option value="3">未完善</option>
                            </select>
                        </div>
                    </div>

                    <!--学生-->
                    <div class="student">

                        <div class="form-group" style="display: none">
                            <label class="col-sm-3 control-label">学历：</label>
                            <div class="col-sm-8">

                                <select class="form-control valid" id="school_education" name="education">
                                    <option value="0">请选择</option>
                                    <option value="1">本科</option>
                                    <option value="2">专科</option>
                                </select>

                                <input id="education" class="form-control" type="hidden" th:value="${user.education}">
                            </div>
                        </div>

                        <div class="form-group" style="display: none">
                            <label class="col-sm-3 control-label">入学时间：</label>
                            <div class="col-sm-8">
                                <input id="timeOfEnrollment" name="timeOfEnrollment" class="form-control" type="text"
                                       th:value="${user.timeOfEnrollment}">
                            </div>
                        </div>

                        <div class="form-group" style="display: none">
                            <label class="col-sm-3 control-label">学校名称：</label>
                            <div class="col-sm-8">
                                <input id="school" name="studentSchool" class="form-control" type="text"
                                       th:value="${user.school}">
                            </div>
                        </div>

                        <div class="form-group" style="display: none">
                            <label class="col-sm-3 control-label">所学专业：</label>
                            <div class="col-sm-8">
                                <input id="school_major" name="studentMajor" class="form-control" type="text"
                                       th:value="${user.major}">
                            </div>
                        </div>

                        <div class="form-group" style="display: none">
                            <label class="col-sm-3 control-label">学校所在地：</label>
                            <div class="col-sm-8">
                                <input id="schoolAddressOne" name="studentSchoolAddress" class="form-control"
                                       type="text"
                                       th:value="${user.schoolAddress}">
                            </div>
                        </div>

                        <div class="form-group" style="display: none">
                            <label class="col-sm-3 control-label">学校详细地址：</label>
                            <div class="col-sm-8">
                                <input id="schoolIndetailAddressOne" name="studentSchoolIndetailAddress"
                                       class="form-control" type="text"
                                       th:value="${user.schoolIndetailAddress}">
                            </div>
                        </div>

                        <div class="form-group" style="display: none">
                            <label class="col-sm-3 control-label">学校层次：</label>
                            <div class="col-sm-8">

                                <select class="form-control valid" id="schoolLevel" name="schoolLevel">
                                    <option value="0">请选择</option>
                                    <option value="1">本科</option>
                                    <option value="2">专科</option>
                                </select>

                                <input id="schoolLevelType" class="form-control" type="hidden"
                                       th:value="${user.schoolLevel}">
                            </div>
                        </div>

                        <div class="form-group" style="display: none">
                            <label class="col-sm-3 control-label">技能等级证书：</label>
                            <div class="col-sm-8">
                                <input id="ratingCertificate" name="ratingCertificate" class="form-control" type="text"
                                       th:value="${user.ratingCertificate}">
                            </div>
                        </div>

                    </div>

                    <!--老师 -->
                    <div class="teacher">

                        <div class="form-group">
                            <label class="col-sm-3 control-label">政治面貌：</label>
                            <div class="col-sm-8">
                                <input id="politicalAffiliation" name="politicalAffiliation" class="form-control"
                                       type="text"
                                       th:value="${user.politicalAffiliation}">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">单位名称：</label>
                            <div class="col-sm-8">
                                <input id="unit_school" name="orgName" class="form-control" type="text"
                                       th:value="${user.orgName}">
                            </div>
                        </div>

<!--                        <div class="form-group">-->
<!--                            <label class="col-sm-3 control-label">单位所在地：</label>-->
<!--                            <div class="col-sm-8">-->
<!--                                <input id="schoolAddress" name="schoolAddress" class="form-control" type="text"-->
<!--                                       th:value="${user.schoolAddress}">-->
<!--                            </div>-->
<!--                        </div>-->

                        <div class="form-group" style="display: flex;align-items: center ">
                            <label class="col-sm-3 control-label">详细地址：</label>
                            <div class="layui-form-item"
                                 style="margin-bottom: -2px !important;margin-left: 15px;">
                                <input id="province" th:value="${user.province}" class="form-control"
                                       type="hidden"
                                >
                                <div class="layui-input-inline"
                                     style="width: 150px;font-size: 16px;display: flex;align-items: center">
                                    省：
                                    <select name="province" id="quiz1">
                                    </select>
                                </div>
                                <input id="city" th:value="${user.city}" class="form-control" type="hidden"
                                >
                                <div class="layui-input-inline"
                                     style="width: 150px;font-size: 16px;display: flex;align-items: center">
                                    市：
                                    <select name="city" id="quiz2">
                                    </select>

                                </div>
                                <input id="district" th:value="${user.district}" class="form-control" type="hidden"
                                >
                                <div class="layui-input-inline"
                                     style="width: 150px;font-size: 16px;display: flex;align-items: center">
                                    区：
                                    <select name="district" id="quiz3">
                                    </select>

                                </div>
                            </div>
                        </div>

                        <!--							<div class="form-group">-->
                        <!--								<label class="col-sm-3 control-label">详细地址：</label>-->
                        <!--								<div class="col-sm-8">-->
                        <!--									<input id="schoolIndetailAddress" name="schoolIndetailAddress" class="form-control" type="text"-->
                        <!--										   th:value="${user.schoolIndetailAddress}">-->
                        <!--								</div>-->
                        <!--							</div>-->

                        <div class="form-group" style="display: none">
                            <label class="col-sm-3 control-label">所在系部：</label>
                            <div class="col-sm-8">
                                <input id="department" name="department" class="form-control" type="text"
                                       th:value="${user.department}">
                            </div>
                        </div>

                        <div class="form-group" style="display: none">
                            <label class="col-sm-3 control-label">所在专业：</label>
                            <div class="col-sm-8">
                                <input id="major" name="major" class="form-control" type="text"
                                       th:value="${user.major}">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">职位信息：</label>
                            <div class="col-sm-8">
                                <input id="officialCapacity" name="officialCapacity" class="form-control" type="text"
                                       th:value="${user.officialCapacity}">
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">职称信息：</label>
                            <div class="col-sm-8">
                                <input id="officialCapacityName" name="officialCapacityName" class="form-control"
                                       type="text"
                                       th:value="${user.officialCapacityName}">
                            </div>
                        </div>

                        <div class="form-group" style="display: none">
                            <label class="col-sm-3 control-label">照片信息：</label>
                            <div class="col-sm-8">
                                <input id="img" name="img" class="form-control" type="hidden" th:value="${user.img}">

                                <div class="closeBtn">
                                    <img id="upImg" th:src="${user.img}" width="100" height="100"><span
                                        class="iconclose"><img src="../../../img/close.png"></span>
                                </div>

                                <button type="button" class="btn btn-success" id="btnAdd" style="margin-top: 10px;">
                                    <i class="fa fa-cloud"></i>图片上传
                                </button>
                            </div>
                        </div>

                        <div class="form-group" style="display: none">
                            <label class="col-sm-3 control-label">收件地址：</label>
                            <div class="col-sm-8">
                                <input id="shippingAddress" name="shippingAddress" class="form-control" type="text"
                                       th:value="${user.shippingAddress}">
                            </div>
                        </div>

                        <div class="form-group" style="display: none">
                            <label class="col-sm-3 control-label">收件详细地址：</label>
                            <div class="col-sm-8">
                                <input id="shippingIndetailAddress" name="shippingIndetailAddress" class="form-control"
                                       type="text"
                                       th:value="${user.shippingIndetailAddress}">
                            </div>
                        </div>

                        <div class="form-group" style="display: none">
                            <label class="col-sm-3 control-label">税号：</label>
                            <div class="col-sm-8">
                                <input id="dutyParagraph" name="dutyParagraph" class="form-control" type="text"
                                       th:value="${user.dutyParagraph}">
                            </div>
                        </div>

                        <div class="form-group" style="display: none">
                            <label class="col-sm-3 control-label">税号单位名称：</label>
                            <div class="col-sm-8">
                                <input id="ticketOrgName" name="ticketOrgName" class="form-control" type="text"
                                       th:value="${user.ticketOrgName}">
                            </div>
                        </div>

                        <div class="form-group" style="display: none">
                            <label class="col-sm-3 control-label">卡号：</label>
                            <div class="col-sm-8">
                                <input id="cardNumber" name="cardNumber" class="form-control" type="text"
                                       th:value="${user.cardNumber}">
                            </div>
                        </div>

                        <div class="form-group" style="display: none">
                            <label class="col-sm-3 control-label">帐户名：</label>
                            <div class="col-sm-8">
                                <input id="accountName" name="accountName" class="form-control" type="text"
                                       th:value="${user.accountName}">
                            </div>
                        </div>

                        <div class="form-group" style="display: none">
                            <label class="col-sm-3 control-label">所属银行：</label>
                            <div class="col-sm-8">
                                <input id="bank" name="bank" class="form-control" type="text"
                                       th:value="${user.bank}">
                            </div>
                        </div>

                    </div>

                    <div class="form-group" style="display: none">
                        <label class="col-sm-3 control-label">学习、工作经历(800字)：</label>
                        <div class="col-sm-8">
                            <textarea class="form-control" name="experience" th:text="${user.experience}"
                                      id="experience" maxlength="800"></textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">备注：</label>
                        <div class="col-sm-8">
                            <input id="remark" name="remark" class="form-control" type="text"
                                   th:value="${user.remark}">
                        </div>
                    </div>
                    <input type="hidden" name="roleIds" id="roleIds"
                           th:value="${roleIds}">
                    <input type="hidden" name="userFrom" id="userFrom" value="1">
                    <!--						<input type="hidden" name="type" id="type" th:value="${user.type}">-->
                    <div class="form-group" style="display:none;">
                        <label class="col-sm-3 control-label">状态:</label>
                        <div class="col-sm-8">
                            <label class="radio-inline"> <input
                                    th:field="*{user.status}" type="radio" name="status" value="1"/>
                                正常
                            </label> <label class="radio-inline"> <input
                                th:field="*{user.status}" type="radio" name="status" value="0"/>
                            禁用
                        </label>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-8 col-sm-offset-3">
                            <button onclick="update()" type="button" class="btn btn-primary">提交</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript" src="/js/webJs/sys/resourceUser/edit.js?r=55">
</script>
</body>
</html>
